Import Glass Catalogue file
This will import catalogue of Glass job items with costs for a given customer and supplier.
NOTE:
Max allowed file size is 1.1Mb.
Fields
| Field Name | Description | Datatype | Validation | Max length | Mandatory | Example |
|---|---|---|---|---|---|---|
| Supplier | account Id/group Id | string | Valid string | Unlimited | Yes | ALRbwQqIVhr0wBjWu0Wp |
| Product | Type of catalogue (reference only, not used by the import) | NA | NA | NA | NA | Glass |
| Vehicle Identifier | Unique Id for a vehicle Make & Model | string | Hyphens, plus signs, letters, digits, underscores and spaces only | Unlimited | No | 75920321 |
| Repair Type ID | ARGIC code | string | Hyphens, plus signs, letters, digits, underscores and spaces only | Unlimited | Yes | ARGICCODE1 |
| Repair Description | Brief description of the job item | string | Hyphens, plus signs, letters, digits, underscores and spaces only | Unlimited | Yes | Wind Screen |
| Make | Vehicle Make | string | Hyphens, plus signs, letters, digits, underscores and spaces only | Unlimited | Yes | Audi |
| Model | Vehicle Model | string | Valid string. Saved as default when empty | Unlimited | No | A4 |
| Vehicle Type | Vehicle type the price applies to | string | Case-insensitive, one of: Car, LCV, Van, Commercial (under 3.5), Commercial (over 3.5), HGV, Motor Bike, Electric Car. Saved as default when empty | NA | No | Car |
| Net Cost | Cost | decimal | Valid number | NA | Yes | 356.08 |
| Uplift Cost | Uplifted cost | decimal | Up to 5 digits with up to 2 decimal places. Must not be lower than Net Cost | NA | No | 400.00 |
| Customer Account Number | Customer account the price applies to | string | Letters, digits and underscores only. Saved as default when empty | Unlimited | No | ACC_45829 |
Combination of Make, Model, Repair Type ID, Vehicle Identifier, Vehicle Type and Customer Account Number must be unique. These fields, in that order, generate the document id; empty fields become
default. For example Audi, A4, ARGICCODE1, 75920321, Car and ACC_45829 generatesaudi-a4-argiccode1-75920321-car-acc_45829; with Model, Vehicle Type and Customer Account Number empty it generatesaudi-default-argiccode1-75920321-default-default
Importing a file
Preparation
- Create a new branch with Jira task number in the branch name
- Delete all the files in importFiles folder
- Create a folder with the current sprint number
- Copy the file that needs to be imported
- Go to
package.json, find the linevalidate:glassPriceCatalogue - Modify
--leaseIdwith the required lease Id - Modify
--filewith the relative path of the file - Save package.json
Validating locally
- in a terminal run
npm run validate:glassPriceCatalogue - If there are no errors, push the code
Validating in workflow
- Go to Action of Import-manger
- Find
<Environment> - on-demand-import - Select the branch that was created for this import
- Enter script name as
validate:glassPriceCatalogue - Leave Overrides empty
Importing the file
- If the validation has passed
- Go to Action of Import-manger
- Find
<Environment> - on-demand-import - Select the branch that was created for this import
- Enter script name as
validate:glassPriceCatalogue - Enter
--persistin Overrides field
Testing
- A folder will be created (if not already exists) in Firestore, under the
/accounts/<accountId from the import file>/cataloguePrice/<lease Id from package.json>/glass - New documents will be added in Typesense > glassCatalogueIndex
Status: Draft
Category: Protected
Authored By: Meet Shah on Sep 16, 2026
Revisions.